Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextgis/control-container

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/control-container

Placing control elements in the corners of the map container

  • 1.19.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Control Container

size version

This library allows placing control elements in the corners of the map container.

Libraries such as Leaflet and Mapbox GL JS are already doing this, but Cesium and Openlayers do not have similar functionality.

╭───────────────────────────────────────────╮
│ top-left                        top-right │
│                   MAP                     │
│ bottom-left                  bottom-right │
╰───────────────────────────────────────────╯

Installation

# latest stable
$ npm install --save-dev @nextgis/control-container
# or
$ yarn add @nextgis/control-container

Usage

import ControlContainer from '@nextgis/control-container';

// initialization
const controlContainer = new ControlContainer({ target: 'map-control-id' });
// or
const controlContainer = new ControlContainer({ map: webMap });
controlContainer.addTo('.map-control-class');

// add simple HTML string
controlContainer.append('<div>HTML</div>', 'top-right');
// or HTML element
controlContainer.append(HTMLElement, 'top-right');

// add control
const control = {
    onAdd(webMap) {
        const container = document.createContainer('div');
        webMap.emitter.on('zoomend', () => {
            container.innerHTML = webMap.getZoom();
        });
        return container
    }
}
controlContainer.addControl(control, 'bottom-right');

Commercial support

Need to fix a bug or add a feature to @nextgis/control-container? We provide custom development and support for this software. Contact us to discuss options!

http://nextgis.com

Keywords

FAQs

Package last updated on 13 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc